1. Field of the Invention
The present invention relates to an image processing apparatus, a method for controlling the same, and a storage medium.
2. Description of the Related Art
Recently, an image processing apparatus such as a printer that supports a plurality of types of Page Description Language (PDL) formats has been proposed. Such an image processing apparatus determines which type of PDL is used (that is, classifies the PDL) in print data to be printed (subjected to image formation) and appropriately interprets the print data according to the determination result, so as to perform print processing.
Also an image processing apparatus has been proposed to which an external medium (external storage medium) such as a USB (Universal Serial Bus) memory can be connected in which print data (PDL data) is stored, the image processing apparatus being capable of performing printing based on the print data stored in the external medium. Such a printing method is also referred to as “media direct printing” because printing is performed directly on the basis of print data stored in an external medium connected to an image processing apparatus, without a PC (Personal Computer) being interposed.
Japanese Patent Laid-Open No. 2008-183886 proposes an image formation apparatus capable of performing direct printing on the basis of print data stored in an external medium. According to the image formation apparatus of Japanese Patent Laid-Open No. 2008-183886, when such print processing is performed, bitmap data that is obtained by analyzing the print data stored in the external medium is associated with the print data and stored in the external medium when printing for the first time. And when printing a second and further times based on the same print data, the image formation apparatus reads out from the external medium the bitmap data associated with the print data to be printed, and performs print processing based on the bitmap data that was read out. This eliminates the need for performing analysis processing for generating bitmap data when performing printing of the same print data a second time and further times, thereby achieving an improvement in print speed.
In recent years, printing systems that support XPS (XML Paper Specification), which is advocated by Microsoft (Registered Trademark) as a novel PDL based on XML (Extensible Markup Language), have become known. Since XPS is not only a document file format but also usable as a PDL format, XPS document, which are data in the XPS format, constitute not only document data but also print data. Accordingly, in an apparatus that can perform direct printing based on print data stored in an external medium, as with the apparatus of Japanese Patent Laid-Open No. 2008-183886, it is conceivable to perform direct printing on the basis of an XPS document stored in the external medium.
An XPS document is generally generated by compressing a plurality of files that constitute the XPS document together into a zip format. If the XPS document stored in the external medium is subjected to print processing, it is necessary to read out (obtain) the files constituting the XPS document in the external medium in the order required for the analysis processing for printing, and to perform the analysis processing thereof. When reading out the files constituting the XPS document from the external medium, the files are read out one by one when required during the analysis processing, so that the external medium is accessed each time. The larger the number of the files constituting the XPS document is, the more often the external medium is accessed, resulting in an increase in an amount of time required for accessing to the external medium. Therefore, performing of printing, from the external medium, of print data that is compatible with a print format such as the XPS format, in which printing is performed using a plurality of files for each page, increases the number of accesses to the external medium, resulting in a reduction in print speed.